package com.sy.servlet;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class HelloServlet4 extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("后置操作");

        System.out.println("asdasff ");
        System.out.println("萨芬的是否感受过被坑了");
        System.out.println("撒打发过几个空开个");
    }
       @Test
    public void addDept(){
        Dept dept=new Dept();
        dept.setDname("sz");
        dept.setLoc("sz");
        int rows=session.insert("addDept",dept);
        System.out.println(rows);
        session.commit();
    }

}
